package com.iris.live.services.data.models;

import javax.persistence.*;
import java.sql.Date;
import java.sql.Timestamp;

/**
 * Created by lusong on 2016/11/24.
 */
@Entity
@Table(name = "crm_topic_log", schema = "live", catalog = "")
public class CrmTopicLogModel {
    private Integer id;
    private String permit;
    private String version;
    private String content;
    private Date updateSendInfoDate;
    private String updateAccount;
    private Timestamp updateTime;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "permit")
    public String getPermit() {
        return permit;
    }

    public void setPermit(String permit) {
        this.permit = permit;
    }

    @Basic
    @Column(name = "version")
    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    @Basic
    @Column(name = "content")
    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Basic
    @Column(name = "updateSendInfoDate")
    public Date getUpdateSendInfoDate() {
        return updateSendInfoDate;
    }

    public void setUpdateSendInfoDate(Date updateSendInfoDate) {
        this.updateSendInfoDate = updateSendInfoDate;
    }

    @Basic
    @Column(name = "updateAccount")
    public String getUpdateAccount() {
        return updateAccount;
    }

    public void setUpdateAccount(String updateAccount) {
        this.updateAccount = updateAccount;
    }

    @Basic
    @Column(name = "updateTime")
    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        CrmTopicLogModel that = (CrmTopicLogModel) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (permit != null ? !permit.equals(that.permit) : that.permit != null) return false;
        if (version != null ? !version.equals(that.version) : that.version != null) return false;
        if (content != null ? !content.equals(that.content) : that.content != null) return false;
        if (updateSendInfoDate != null ? !updateSendInfoDate.equals(that.updateSendInfoDate) : that.updateSendInfoDate != null)
            return false;
        if (updateAccount != null ? !updateAccount.equals(that.updateAccount) : that.updateAccount != null)
            return false;
        if (updateTime != null ? !updateTime.equals(that.updateTime) : that.updateTime != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (permit != null ? permit.hashCode() : 0);
        result = 31 * result + (version != null ? version.hashCode() : 0);
        result = 31 * result + (content != null ? content.hashCode() : 0);
        result = 31 * result + (updateSendInfoDate != null ? updateSendInfoDate.hashCode() : 0);
        result = 31 * result + (updateAccount != null ? updateAccount.hashCode() : 0);
        result = 31 * result + (updateTime != null ? updateTime.hashCode() : 0);
        return result;
    }
}
